package kr.hkit.androidcomplete01.chaptert07;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.os.Bundle;
import android.view.View;

public class AntiAliasEx extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		MyView mv = new MyView(this);
		setContentView(mv);
	}
	
	class MyView extends View {

		public MyView(Context context) {
			super(context);
		}

		@Override
		protected void onDraw(Canvas canvas) {
			super.onDraw(canvas);
			canvas.drawColor(Color.LTGRAY);
			Paint Pnt = new Paint();
			Pnt.setColor(Color.BLACK);
			Pnt.setTextSize(60);
			
			//기본출력
			canvas.drawOval(new RectF(10, 10, 200, 120), Pnt);
			canvas.drawText("Text", 210, 70, Pnt);
			
			//안티 알리아스 적용
			Pnt.setAntiAlias(true);
			canvas.drawOval(new RectF(10, 130, 200, 240), Pnt);
			canvas.drawText("Text", 210, 190, Pnt);
		}
		
		
		
	}
}
